#!/bin/bash
workdir="/home/ceph-deploy.d"
cephlist="${workdir}/cephlist.txt"
for ip in $(cat $cephlist);
    do echo ----$ip-----------
#    ceph-deploy gatherkeys $ip
#    ceph-deploy --overwrite-conf osd prepare $ip:/dev/sdb1
#    sleep 1
#    ceph-deploy --overwrite-conf osd prepare $ip:/dev/sdc1
#    sleep 1
#    ceph-deploy --overwrite-conf osd prepare $ip:/dev/sdd1
#    sleep 1
#    ceph-deploy --overwrite-conf osd prepare $ip:/dev/sde1
#    sleep 1
#    ceph-deploy --overwrite-conf osd prepare $ip:/dev/sdf1
#    sleep 1
#    ceph-deploy --overwrite-conf osd prepare $ip:/dev/sdg1
#    sleep 1
#    ceph-deploy --overwrite-conf osd prepare $ip:/dev/sdh1
#    sleep 1
#    ceph-deploy --overwrite-conf osd prepare $ip:/dev/nvme0n1p1
#    sleep 1
    ceph-deploy osd activate $ip:/dev/nvme0n1p1
    sleep 1
    ceph-deploy osd activate $ip:/dev/nvme0n1p2
    sleep 1
    ceph-deploy osd activate $ip:/dev/nvme0n1p3
    sleep 1
    ceph-deploy osd activate $ip:/dev/nvme0n1p4
    sleep 1
    ceph-deploy osd activate $ip:/dev/nvme1n1p1
    sleep 1
    ceph-deploy osd activate $ip:/dev/nvme1n1p2
    sleep 1
    ceph-deploy osd activate $ip:/dev/nvme1n1p3
    sleep 1
    ceph-deploy osd activate $ip:/dev/nvme1n1p4
    sleep 1
done
